<template>
  <div>
    <el-image :src="imgSrc" class="img-container" lazy>
      <div slot="error" class="image-slot">
        <!-- eslint-disable-next-line -->
        <img src="@/assets/common/head.jpg" alt="" />
      </div>
    </el-image>
  </div>
</template>

<script>
export default {
  props: {
    img: {
      type: String,
      default: ''
    }
  },
  data() {
    return {}
  },
  computed: {
    imgSrc() {
      return this.img
    }
  }
}
</script>

<style scoped lang="scss">
.img-container {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  img {
    width: 100%;
  }
}
</style>
